package atm.physical;

import java.util.Date;
import atm.domain.Card;
import atm.domain.Receipt;

public class ReceiptPrinter{

	/**
	 * 凭条打印机
	 */
	
	private Receipt receipt;
    private int money;

//    public ReceiptPrinter(){
//    	this.setText("凭条打印机");
//    }
    
    public Receipt print(Card card, Date date, int amount){
    	money+=amount;
        String info = "";
    	info+="\n账户: "+ card.getCardid() + "\n本次取款金额:"+amount+"\n取款总金额:" + money +"\n日期"+ date;
    	return new Receipt(info);

  
    }
    
	public Receipt getReceipt() {
		return receipt;
	}
	public void setReceipt(Receipt receipt) {
		this.receipt = receipt;
	}
}
